home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
Tools
/
freeWAIS-sf-1.1
/
bin
/
server_stats.script
< prev
next >
Wrap
Text File
|
1994-08-04
|
1KB
|
44 lines
#!/bin/sh
# $Header: /usr/local/ls6/src+data/src/freeWAIS-sf/bin/RCS/server_stats.script,v 1.1 1994/08/05 06:52:43 pfeifer Exp $
# $Log: server_stats.script,v $
# Revision 1.1 1994/08/05 06:52:43 pfeifer
# Release beta 04
#
# Revision 1.8 92/03/15 11:31:41 jonathan
# Added line for warnings.
#
# Revision 1.7 92/03/11 08:38:30 jonathan
# Removed "error" from grep line. Added RCS headers.
#
#
# this is a simple script for generating statistics on the log
# the argument to this script is the name of the server log file.
if (test $# -eq 0)
then
echo "usage: $0 <server-log-file>"
echo " Generates statistics on the use of the Server"
exit 1
fi
#my_dir=`dirname $0`
my_dir=`echo $0 | sed 's,/[^/]*$,,'`
my_name=`basename $0`
if (test $my_dir -eq ""); then
for dir in $PATH; do
if [ -f $dir/$my_name ]; then
my_dir=$dir
fi
done
fi
cat $* | $my_dir/trunc 80 | awk -f $my_dir/stats.awk
echo -n "Errors: "
grep ": -1:" $* | wc -l | awk '{ print $1 }'
echo -n "Warnings: "
grep ": -2:" $* | wc -l | awk '{ print $1 }'